1. Technical Field
The present invention relates to a three-dimensional visual sensor that recognizes an object through three-dimensional measurement processing using a stereo camera, particularly to a technology for displaying recognition result.
2. Related Art
For example, when three-dimensional recognition processing is performed in order to cause a robot to grasp a component in a manufacturing scene, the three-dimensional information restored by the three-dimensional measurement of a stereo camera is checked with the previously registered three-dimensional model of the recognition-target object to recognize the position and attitude (specifically, a rotation angle with respect to three-dimensional model) of the recognition-target object (for example, see Japanese Unexamined Patent Publication No. 2000-94374). Occasionally the similar technique is applied to inspection to determine whether a position or an attitude of an inspection object is proper.
Generally the three-dimensional model used in the recognition processing expresses a shape (mainly contour) of the full-scale recognition-target object by plural three-dimensional coordinates. In the recognition processing, the three-dimensional model and restored three-dimensional information are correlated to each other such that a degree of coincidence between the three-dimensional model and restored three-dimensional information becomes the maximum.
At this point, the position and rotation angle of the three-dimensional model are specified as the position and attitude of the recognition-target object.
The recognition processing result can be displayed as a coordinate expressing the position and an angle expressing the attitude. However, because only a simple numerical display is difficult to understand, there is a user demand to be able to easily confirm the recognition result and accuracy of the recognition result.
The inventor studies to perform coordinate transformation of the three-dimensional model based on the recognized position or rotation angle to three-dimensionally display the post-coordinate-transformation model. When perspective transformation of the three-dimensional model to which the coordinate transformation into an imaging surface of the camera is performed based on the recognition result, a projection image that is seen in a way similar to that of the recognition-target object is produced. Therefore, the inventor studies a method for changing the projection image of the three-dimensional model to a stereoscopic display according to a change in a direction of a line of sight based on the display in which the projection image of the three-dimensional model is superimposed on the image of the recognition-target object.
However, in the perspective transformation processing, because the projection image is produced based on a parameter reflecting magnification of the camera so as to be seen in the way similar to that of the actual image, even in the plane having the same area, a size of the plane formed on the imaging surface depends on a distance from the camera. Therefore, when the perspective transformation of the image in which a height according to a Z-coordinate at a corresponding point of the original model is correlated to each point of the projection image of the three-dimensional model is performed from a direction distant from a direction orthogonal to the imaging surface, the projection image whose size varies depending on a difference of the Z-coordinate is directly projected to produce the image having a large deformation, and therefore the shape of the three-dimensional model cannot properly be expressed.